# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=jbe
pkgver=0.1.1
pkgrel=1
pkgdesc='Java bytecode editor suitable for viewing and modifying java class files.'
arch=('any')
groups=('blackarch' 'blackarch-decompiler' 'blackarch-reversing')
url='https://set.ee/jbe/'
license=('GPL2')
depends=('java-environment')
source=("https://set.ee/jbe/$pkgname-$pkgver.zip")
sha512sums=('c92ac53f807cd91a2ce3d760ffb4a46ef70f5f72b8c936296eb9967af8295b7ea3b181ed20de68fbfa1bcb5d160fd09a3c0f1a29c3e5aa48fdc69ca2e4f91a08')

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
cd /usr/share/$pkgname/bin
exec java ee.ioc.cs.jbe.browser.BrowserApplication
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

